package cn.wolfcode.luowowo.acticle.mapper;

import cn.wolfcode.luowowo.acticle.domain.StrategyDetail;
import cn.wolfcode.luowowo.acticle.query.StrategyDetailQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();

    int updateByPrimaryKey(StrategyDetail record);

    List<StrategyDetail> selectForList(StrategyDetailQueryObject qo);

    void updateState(@Param("id") Long id, @Param("state") Integer state);

    void insertRelationForDetailAndTagRelation(@Param("tagId") Long tagId, @Param("detailId") Long detailId);

    void deleteRelationForDetailAndTagRelation(Long detailId);

    String selectTagsByDetailId(Long detailId);

    List<StrategyDetail> selectDetailTop3ByDestId(Long destId);

    List<StrategyDetail> selectDetailByStrategyId(Long strategyId);

    void updateStatisData(StrategyDetail detail);
}